<?php
include('inc_head.php');
if($wu->request_string('act')=='del' && request_int('id')){
	$db->delete('tgeneralfeedback','ID='.$wu->request_int('id'));
	$wu->redirect('删除成功','?success');	
}
?>
<table class="table table-hover table-bordered">
    <tr><th>序号</th><th>用户名称</th><th>邮箱</th><th>意见内容</th><th>留言时间</th><th>操作</th></tr>  
<?php
	$pager=new pagerhelper();
	$pager->setquery('tgeneralfeedback','*');
    if($pager->recordset){
        $i=1;
        foreach($pager->recordset as $row){
            echo "<tr><td>".$i."</td><td>".$row['UserName']."</td><td>".$row['Email']."</td><td>".$row['Content']."</td><td>".$row['CreatedTime']."</td><td><a href='?act=del&id=".$row['ID']."'>删除</a></td></tr>";
            $i++;
        }
    }
?>
</table>
<div class="pager"><?php echo $pager->get_pagerbar(); ?></div>
<?php
	include('inc_foot.php');
?>